#include<iostream>
#include<memory>
#include"MyCfile.hpp"

using namespace std;

int main()
{
    MyFile* fp = _fopen("./log.txt", "a");
    if(fp == nullptr)
    {
        cerr << "open error!" << endl;
    }

    char buf[1024] = "孙笑川是个司马脸\n";
    // char buf[1024] = "孙笑川是个司马脸,孙笑川是个司马脸,孙笑川是个司马脸\n";

    int len = _fwrite(buf, sizeof(buf), fp);
    cout << len << endl;

    _fclose(fp);

    return 0;
}